<?php

/**
 * Created by PhpStorm.
 * User: dev
 * Date: 5/9/14
 * Time: 3:18 PM
 * TABLE : comments
 * id
 * post_id
 * name
 * email
 * comments
 * created_on
 * updated_on
 * status
 */
class Comments extends Eloquent {

    public static $table = 'comments';
    public static $key = 'id';
    public static $timestamps = true;


    function __construct(){
        parent::__construct();

    }

    public function post()
    {
        return $this->belongs_to('Post');
    }

    public static function total(){
        return Comments::count();
    }
}